import { Button, Popconfirm ,message} from 'antd';
import axios from 'axios';
export default function Cz ({id}:{id:number}){
function onf () {
    axios
    .get(`http://www.abao-node.cn:300/schg/del/${id}`).then(
        res=>{
            message.info("删除成功")
        }
    ).catch(err=>{
        message.error("删除失败")
    })
}
return (
    <Popconfirm title="确认删除数据"  onConfirm={onf}  >
    <Button type="primary">删除数据</Button>
    </Popconfirm>
)
}